" tagbar
"------------
" tagbar config
"------------
"autocmd BufReadPost *.cpp,*.c,*.h,*.py,*.hpp,*.cc,*.cxx call tagbar#autoopen()  "如果是c语言的程序的话，tagbar自动开启

"noremap <silent>  <m-l> :TagbarToggle<CR>
"noremap <silent>  <F4> :TagbarToggle<CR>
" noremap <silent> <c-l> :TagbarToggle<CR>

" tagbar默认去这个目录中寻找ctags，ctags的默认安装路径也是这个目录
let g:tagbar_ctags_bin = '/usr/bin/ctags'  " Proper Ctags locations
"let g:tagbar_autofocus = 1					" 启动 时自动focus
let g:tagbar_autoshowtag = 1
let g:tagbar_vertical = 20
let g:tagbar_left      = 1
let g:tagbar_width     = 25
let g:tagbar_autofocus = 0
let g:tagbar_sort      = 0
let g:tagbar_compact   = 1
let g:tagbar_show_linenumbers=-1

" tag for coffee
if executable('coffeetags')
  let g:tagbar_type_coffee = {
        \ 'ctagsbin' : 'coffeetags',
        \ 'ctagsargs' : '',
        \ 'kinds' : [
        \ 'f:functions',
        \ 'o:object',
        \ ],
        \ 'sro' : ".",
        \ 'kind2scope' : {
        \ 'f' : 'object',
        \ 'o' : 'object',
        \ }
        \ }

  let g:tagbar_type_markdown = {
    \ 'ctagstype' : 'markdown',
    \ 'sort' : 0,
    \ 'kinds' : [
        \ 'h:sections'
    \ ]
    \ }
endif

"makefile
let g:tagbar_type_make = {
            \ 'kinds':[
                \ 'm:macros',
                \ 't:targets'
            \ ]
\}
